/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.List;
import java.util.stream.Stream;

/**
 * <p>Project: jse2302 - Stream01
 * <p>Powered by webrx On 2023-06-28 17:35:56
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Stream01 {
    public static void main(String[] args) {
        //System.out.println("aa\r\nbb\r\naasdfas\r\na");

        //
        //Stream<String> lines = "aa\r\nbb\r\naasdfas\r\na".lines();
        //String sss = lines.collect(Collectors.joining(","));
        //System.out.println(sss);
        //System.out.println(lines.count());








        List<String> java = List.of("java", "myava", "php", "javascript", "userjava", "c", "python");
        Stream<String> ss = java.parallelStream();
        ss.filter(e -> e.contains("java"));
        ss.forEach(System.out::println);
        ss.forEach(System.out::println);
        ss.forEach(System.out::println);


        //
        //for(String str : java){
        //    //if(str.contains("java")) {
        //    //    System.out.println(str);
        //    //}
        //
        //    //str.endsWith("a")
        //    if(str.startsWith("java")) System.out.println(str);
        //}
    }
}
